package com.xuan.controller;

import com.xuan.pojo.User;
import com.xuan.service.Impl.UserSerciceImpl;
import com.xuan.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {
    @Autowired
    UserSerciceImpl userService;
    @GetMapping("/getuser")
    @ResponseBody
    public User getUser(String name){
        return  userService.queryUserByName(name);
    }
}
